﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:p="clr-namespace:MagickViewer.Properties"
                    xmlns:m="clr-namespace:MagickViewer.Controls">
  <!-- Storyboard -->
  <Storyboard x:Key="FadeIn">
    <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.5"/>
    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility">
      <DiscreteObjectKeyFrame KeyTime="0:0:0.0" Value="{x:Static Visibility.Visible}"/>
    </ObjectAnimationUsingKeyFrames>
  </Storyboard>
  <Storyboard x:Key="FadeOut">
    <DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.5"/>
    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility">
      <DiscreteObjectKeyFrame KeyTime="0:0:1.0" Value="{x:Static Visibility.Hidden}"/>
    </ObjectAnimationUsingKeyFrames>
  </Storyboard>
  <Storyboard x:Key="Rotate">
    <DoubleAnimation Storyboard.TargetProperty="(RenderTransform).(RotateTransform.Angle)" To="360" Duration="0:0:4" RepeatBehavior="Forever"/>
  </Storyboard>
  <!-- Button -->
  <Style TargetType="Button" x:Key="Shared.Icon">
    <Setter Property="Height" Value="16"/>
    <Setter Property="Width" Value="16"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid Background="{TemplateBinding Background}">
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ContentPresenter HorizontalAlignment="Center"/>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="Button" x:Key="Shared.MenuButton" BasedOn="{StaticResource Shared.Icon}">
    <Setter Property="MinWidth" Value="90" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Margin" Value="4 0 4 0"/>
  </Style>
  <!-- Logo -->
  <Style TargetType="m:Logo" x:Key="Shared.Logo">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type m:Logo}">
          <Grid>
            <StackPanel VerticalAlignment="Center">
              <Image Source="../../Icons/MagickViewer.png" Stretch="None"/>
              <TextBlock FontFamily="{TemplateBinding FontFamily}" Foreground="{TemplateBinding Foreground}"
                         Margin="0 10 0 0" HorizontalAlignment="Center" VerticalAlignment="Center">
                <TextBlock.Inlines>
                  <Run>Copyright 2014-2016 Dirk Lemstra, click</Run>
                  <Run TextDecorations="Underline">here</Run>
                  <Run>to make a</Run>
                  <Run FontWeight="ExtraBlack">donation</Run>
                </TextBlock.Inlines>
              </TextBlock>
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
</ResourceDictionary>